// ignore_for_file: file_names, must_be_immutable, constant_identifier_names, slash_for_doc_comments, avoid_unnecessary_containers, prefer_const_constructors, unnecessary_cast, sized_box_for_whitespace, prefer_function_declarations_over_variables, overridden_fields, annotate_overrides, prefer_const_literals_to_create_immutables, unnecessary_null_comparison, deprecated_member_use

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:mybase/base/tool/empty/FFEmpty.dart';
import 'package:mybase/base/tool/pprint/FFLog.dart';
import 'package:mybase/base/tool/screenPrint/ScreenPrintManager.dart';

class YCGlobalManger {
  // 单例公开访问点
  factory YCGlobalManger() => _sharedInstance();

  // 静态、同步、私有访问点
  static YCGlobalManger _sharedInstance() {
    return _instance;
  }

  // 静态私有成员，没有初始化
  static final YCGlobalManger _instance = YCGlobalManger._();

  // 私有构造函数
  YCGlobalManger._() {
    // 具体初始化代码
  }

  YCManager? delegate;

  init() {
    FlutterError.onError = (FlutterErrorDetails details) {
      FFLog.error(
        "发现错误\nexception】\n${details.exception.toString()}\n\n【stack】\n${details.stack.toString()}",
      );
    };
  }
}

abstract class YCManager {
  BuildContext? getBuildContext();
}
